/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication4.model;

import javaapplication4.model.observer.Observer;
import javaapplication4.model.observer.Observable;
import java.util.ArrayList;

/**
 *
 * @author mathieubakrim
 */
public abstract class AbstractModel implements Observable {
    protected Contact contact;
    
    private ArrayList<Observer> listObserver = new ArrayList<Observer>();
    
    // Delete a contact
    public abstract void deleteContact(Contact c);
    
    // Create a contact
    public abstract Contact createContact(String ln, String fn, String pn, String ap, String ape, String hp, String ep, String epe);
    
    // Edit a contact
    public abstract void editContact(Contact cOld, Contact cNew);
    
    // Show a contact details
    public abstract String showDetails(Contact c);
    
    // Show all contacts, per alphabetical order & per alpha letter
    public abstract ArrayList<Contact> showAlphaList();
    
    // Show all contacts, per virtual group (frinds, family, companies, co-workers)
    public abstract ArrayList<Contact> showGroupList();
    
    // Show all contact, per creation date (oldest, desc)
    public abstract ArrayList<Contact> showDateList();
    
    // Observer pattern implementation
    public void addObserver(Observer obs){
        this.listObserver.add(obs);
    }
    
    public void notifyObserver(String str){
        //tbd
    }
    
    public void removeObserver(){
        listObserver = new ArrayList<Observer>();
    }

    
        
    
    
}
